<template>
  <login-com :config="config" @forgotPassword="forgotPassword" @loginSuccess="loginSuccess"/>
</template>

<script lang="ts">
import { Vue, Component } from 'vue-property-decorator'
import LoginCom from '@/components/login/index.vue'
import WPopView, { PopType } from '@/utils/popView'
import config from '@/project/index/config'

@Component({
  components: {
    LoginCom
  }
})
export default class Login extends Vue{
  /**
   * 配置数据
   */
  config = config

  /**
   * 忘记密码
   */
  forgotPassword() {
    WPopView.alert('提示！', '请联系管理员修改密码', PopType.info)
  }

  loginSuccess() {
    this.$router.replace('/')
    this.$store.commit('SET_PROJECT')
  }
}
</script>

<style scoped>

</style>
